package generics_and_collections.equals;

/**
 * Created with IntelliJ IDEA.
 * User: Sam
 * Date: 03/02/14
 * Time: 19:15
 * To change this template use File | Settings | File Templates.
 */

/**
 *
 * pg 545
 *
 * == true if both instances/references refer to the same object, just compares bits in variables
 * equals() true if the objects themselves (their values) are the same... not just references
 *
 * Some objects should never be equal, and therefore do not override the equals() method.
 *
 * If you do not override equals(), object cannot be used as key in hashtable
 *
 */
public class EqualsTest {

	public void execute() {

		Moof a = new Moof(8);
		Moof b = new Moof(9);

		System.out.println("a equals b: " + a.equals(b));
	}
}
